import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Element from 'element-ui'
import axios from 'axios'

import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
import FormMaking from 'form-making-zwl'
import 'form-making-zwl/FormMaking.css'

// 解决点击同一路由报的vue警告
import Router from 'vue-router'

// 全局css样式
import 'assets/styles/index.scss'
import 'assets/theme/index.css'
// 引入store
import store from './store'

// 国际化
import i18n from './lang'

Vue.use(FormMaking)

Vue.prototype.$http = axios
Vue.config.productionTip = false

// 使用Element UI
Vue.use(Element, {
  i18n: (key, value) => i18n.t(key, value)
})

// 解决点击同一路由报的vue警告
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(Element)

new Vue({
  i18n,
  store,
  router,
  render: h => h(App)
}).$mount('#app')
